//
//  ListMusicView.m
//  海角音乐
//
//  Created by dllo on 15/8/10.
//  Copyright (c) 2015年 杨元石. All rights reserved.
//

#import "ListMusicView.h"

@implementation ListMusicView

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    
    if (self) {
        
        CGFloat width = SCREEN_WIDTH*0.426666; // 160
        CGFloat height = SCREEN_WIDTH*0.53333; // 200
        _flowLayout = [[UICollectionViewFlowLayout alloc] init];
        _flowLayout.itemSize = CGSizeMake(width, height);
        _flowLayout.minimumLineSpacing = 1;
        _flowLayout.minimumInteritemSpacing = 1;
        _flowLayout.sectionInset = UIEdgeInsetsMake(10,15,20,15);
        self.collectionView = [[UICollectionView alloc]initWithFrame:CGRectMake(0, 64, SCREEN_WIDTH, SCREEN_HEIGHT) collectionViewLayout:_flowLayout];
        [self addSubview:_collectionView];
        
    }
    return self;
}




/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
